package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.PageResult;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.util.List;

public interface IEmployeeService {
    void delete(Long id);

    void save(Employee employee, Long[] ids);

    Employee get(Long id);

    List<Employee> listAll();

    void update(Employee employee, Long[] ids);

    PageInfo<Employee> query(QueryObject qo);

    Employee login(String username, String password);

    void updatePassword(String newPassword,Long employeeId);

    void batchDelete(Long[] ids);

    Employee checkEmployeeById(Long name);

    Employee checkEmployeeByName(String name);

    void changeEnableState(Long empId);
    //根据角色编码查询员工（可变参数）
    List<Employee> selectByRoleSn(String...sns);

    interface IRoleService {
        void delete(Long id);

        void save(Role role);

        Role get(Long id);

        List<Role> listAll();

        void update(Role role);

        PageResult<Role> query(QueryObject qo);
    }
    //导出
    HSSFWorkbook exportXls();

    //导入
    void importXls(HSSFWorkbook workbook);
}
